package com.rightsidetech.activity.dto.request;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Range;

import javax.validation.constraints.Min;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;

/**
 * @Author: yhr
 * @Date: 2021-12-22 13:37
 */
@Data
public class ActCouponActivitySaveReq implements Serializable {
    @ApiModelProperty(value = "活动名称",required = true)
    @NotBlank(message = "活动名称不能为空")
    private String activityName;
    @ApiModelProperty(value = "基础优惠券id",required = true)
    @NotNull(message = "基础优惠券id不能为空")
    private Long couponBaseId;
    @ApiModelProperty(value = "最低消费金额",required = true)
    @NotNull(message = "最低消费金额不能为空")
    @Min(value = 0,message = "最低消费金额不合法")
    private Long minConsumeAmount;
    @ApiModelProperty(value = "最高抵扣金额",required = true)
    @Min(value = 0,message = "最高抵扣金额不合法")
    private Long maxDiscountAmount;
    @ApiModelProperty(value = "有效期",required = true)
    @NotNull(message = "有效期不能为空")
    private String endTime;
    @ApiModelProperty(value = "活动封面")
    private String picture;
    @ApiModelProperty(value = "优惠券发放对象（0 用户 1 门店）",required = true)
    @NotNull(message = "优惠券发放对象不能为空")
    @Range(min = 0, max = 1, message = "优惠券发放对象不合法")
    private Byte target;
    @ApiModelProperty(value = "等级 发放等级(-1全部 其他对应等级)",required = true)
    @NotNull(message = "发放等级不能为空")
    private Byte level;
    @ApiModelProperty(value = "总数量",required = false)
    private Long totalQuantity;
    @ApiModelProperty(value = "最多领取数量",required = true)
    @NotNull(message = "最多领取数量不能为空")
    @Min(value = 0,message = "最多领取数量不合法")
    private Long getQuantity;
    @ApiModelProperty(value = "规则详情",required = true)
    @NotBlank(message = "规则详情不能为空")
    private String ruleDetails;

    @ApiModelProperty(value = "使用范围,代理商id数组",hidden = true)
    private String useScope;

    @ApiModelProperty("大区id数组")
    private String areaIds;

    @ApiModelProperty("代理商id数组")
    private String agentIds;
}
